<%@page import="sitescoring.model.Domain"%>
<%@page import="java.util.List"%>
<%@page import="sitescoring.controller.ReturnPoint"%>
<%@page import="sitescoring.controller.Utils"%>
<%@page contentType="text/html;charset=UTF-8" language="java"%>
<%
String name = (String)request.getAttribute("name");
//Domain domains = (Domain)request.getAttribute("domains");

int length = Utils.checkLengthDomain(name); 
int pointDomain = ReturnPoint.lengthDomain(length,Utils.returnDownDomain(name));
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>

		<link rel='stylesheet' type='text/css' href='/css/site.css' />
		<script type="text/javascript" src="http://www.google.com/jsapi"></script>
		<script type="text/javascript">
	      google.load('visualization', '1');
	    </script>
	    <script type="text/javascript">
	      function drawVisualization() {
	        var wrapper = new google.visualization.ChartWrapper({
	          chartType: 'ColumnChart',
	          dataTable: [['<%=name%>', 'Title', 'Description', 'Keyword', 'Iframe', 'Image', 'Flash', 'Javascript', 'Css','Character'],
	                      [<%=pointDomain%>, 6, 8, 2, 1, 9,3,5,6,7]],
	          options: {'title': 'Total : 86/100'},
	          containerId: 'visualization'
	        });
	        wrapper.draw();
	      }
	      
	
	      google.setOnLoadCallback(drawVisualization);
	    </script>
	</head>
	<body>
		<div class="frame">
			<div class="header">
				<img src="http://www.firstping.com/images/logo.gif" alt="" />
				<form class="search" action="/search" method="get">
					<input type="text" value="www.example.com" onclick="javascript:this.value=''" name="name"/>
					<button>Search</button>
				</form>
				<div class="addthis">
					<div class="addthis_toolbox addthis_default_style ">
					<a class="addthis_button_google_plusone"></a>
					<a class="addthis_button_compact"></a>
					</div>
					<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4d6f3cdb1d190d60"></script>
					<!-- AddThis Button END -->
				</div>
				<div class="like">
					<a class="addthis_button_facebook_like"></a>
				</div>
				<div class="clear"></div>
			</div>
			<div class="adv">

			</div>
			<div class="body">
				<div class="body_left">
					<div id="visualization" style="width: 500px; height: 200px;"></div>
					<div class="adv">

					</div>
					<div class="total"><strong>Total : </strong> <span>86</span>/100</div>
					<table class="view" cellpadding="0" cellspacing="0">
						<tr>
							<th>Name</th>
							<th>Statistics</th>
							<th>Point</th>
						</tr>
						<tr>
							<td><%=name %></td>
							<td>
								<%
									out.print(length+" character<br/>");
									out.print(Utils.returnSubDomain(name));
								%>
							</td>
							<td><%=pointDomain%></td>
						</tr>
						<tr>
							<td>Title</td>
							<td>
							
							</td>
							<td>4</td>
						</tr>
						<tr>
							<td>Description</td>
							<td>yes</td>
							<td>4</td>
						</tr>
						<tr>
							<td>Keyword</td>
							<td>yes</td>
							<td>4</td>
						</tr>
						<tr>
							<td>Iframe</td>
							<td>yes</td>
							<td>4</td>
						</tr>
						<tr>
							<td>Image</td>
							<td>yes</td>
							<td>4</td>
						</tr>
						<tr>
							<td>Flash</td>
							<td>yes</td>
							<td>4</td>
						</tr>
						<tr>
							<td>Javascript</td>
							<td>yes</td>
							<td>4</td>
						</tr>
						<tr>
							<td>Css</td>
							<td>yes</td>
							<td>4</td>
						</tr>
						<tr>
							<td>Character</td>
							<td>yes</td>
							<td>4</td>
						</tr>
					</table>
				</div>
				<div class="body_right">
					<img src="http://www.adcherry.com/img/sample_banner3.jpg" alt="" />
				</div>
				<div class="clear"></div>
			</div>
		</div>
	</body>
</html>